const modalMixin = {
  data () {
    return {
      modalType: ''
    }
  },
  computed: {
    modalTitle () {
      let title = ''
      switch (this.modalType) {
        case 'view':
          title = '查看'
          break
        case 'add':
          title = '新增'
          break
        case 'edit':
          title = '编辑'
          break
        default:
          title = '查看'
      }
      return title
    }
  },
  methods: {}
}

export default modalMixin
